package cn.wolfcode.trip.base.service;

import cn.wolfcode.trip.base.domain.Travel;
import cn.wolfcode.trip.base.domain.TravelComment;
import cn.wolfcode.trip.base.domain.TravelContent;
import cn.wolfcode.trip.base.domain.User;
import cn.wolfcode.trip.base.query.QueryObject;
import cn.wolfcode.trip.base.query.StrategyCatalogQuery;
import cn.wolfcode.trip.base.query.TravelQuery;
import com.github.pagehelper.PageInfo;

import java.util.List;

public interface ITravelService {
    /**
     * 分页查询
     *
     * @param qo
     * @return
     */
    PageInfo query(TravelQuery qo);

    /**
     * 保存
     */
    void save(Travel travel);

    /**
     * 根据游记id查询游记对象
     *
     * @param id
     * @return
     */
    Travel getById(Long id);

    /**
     * 修改
     *
     * @param travel
     */
    void update(Travel travel);

    /**
     * 根据游记id查询文章内容
     *
     * @param id
     * @return
     */
    TravelContent getContentById(Long id);

    /**
     * 修改状态
     *
     * @param travel
     * @return
     */
    void changeState(Travel travel);

    /**
     * 根据大攻略id查询游记信息
     *
     * @param qo
     * @return
     */
    PageInfo selectByStrategyId(StrategyCatalogQuery qo);

    List listAll();

    List<Travel> getTravelsByStrategyId(Long id);
    List<Travel> selectByStrategyId(Long strategyId);

    List selecttravelbyid(TravelQuery qo);

    PageInfo getCommentsByTravelId(Long tid, QueryObject qo);

    void saveComment(TravelComment travelComment);
}
